package com.kf.bigbluebook.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kf.bigbluebook.model.po.User;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
* @author 86157
* @description 针对表【user(用户)】的数据库操作Service
* @createDate 2025-01-12 19:09:34
*/
public interface UserService extends IService<User> {
    List<User> searchUserByTags(List<String> tagNameList);


    Long register(String userAccount, String password, String checkPassword);

    User login(String userAccount, String password, HttpServletRequest request);

    Boolean isAdmin(HttpServletRequest request);
    Boolean isAdmin(User user);
    User getSafetyUser(User originalUser);

    int logout(HttpServletRequest request);

    User getLoginUser(HttpServletRequest request);

    int updateUser(User user, User loginUser);

    Page<User> pageList(long pageSize, long pageNum, User loginUser);

    List<User> matchUsers(long num, User user);
}
